export function changeTime(time){
	const dateObj = new Date(time * 1000);
	 
	// 获取年月日时分秒
	let year = dateObj.getFullYear();
	let month = (dateObj.getMonth() + 1).toString().padStart(2, '0');
	let day = dateObj.getDate().toString().padStart(2, '0');
	let hours = dateObj.getHours().toString().padStart(2, '0');
	let minutes = dateObj.getMinutes().toString().padStart(2, '0');
	let seconds = dateObj.getSeconds().toString().padStart(2, '0');
	
	return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
}

export function validatePhone(str) {
  const reg = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/
  return reg.test(str)
}